home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ssssttttrrrrffffmmmmoooonnnn((((3333SSSS)))) ssssttttrrrrffffmmmmoooonnnn((((3333SSSS))))
-
-
-
- NNNNAAAAMMMMEEEE
- _ssss_tttt_rrrr_ffff_mmmm_oooo_nnnn - convert monetary value to string
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_mmmm_oooo_nnnn_eeee_tttt_aaaa_rrrr_yyyy_...._hhhh_>>>>
-
- _ssss_ssss_iiii_zzzz_eeee______tttt _ssss_tttt_rrrr_ffff_mmmm_oooo_nnnn_((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _ssss_iiii_zzzz_eeee______tttt _mmmm_aaaa_xxxx_ssss_iiii_zzzz_eeee_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _...._...._...._))))_;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _ssss_tttt_rrrr_ffff_mmmm_oooo_nnnn places characters into the array pointed to by _s as controlled by
- the string pointed to by _f_o_r_m_a_t. No more than _m_a_x_s_i_z_e bytes are placed
- into the array.
-
- The format is a character string that contains two types of objects:
- plain characters, which are simply copied to the output stream, and
- conversion specifications, each of which results in the fetching of zero
- or more arguments which are converted and formatted. The results are
- undefined if there are insufficient arguments for the format. If the
- format is exhausted while arguments remain, the excess arguments are
- simply ignored.
-
- A conversion specification consists of the following sequence:
-
- _----_---- a _%%%% character
-
- _----_---- optional flags
-
- _----_---- optional field width
-
- _----_---- optional left precision
-
- _----_---- optional right precision
-
- _----_---- a required conversion character that determines the conversion to be
- performed.
-
- FFFFllllaaaaggggssss
-
- One or more of the following optional flags can be specified to control
- the conversion:
-
- _====_ffff An = followed by a single character _f which is used as the
- numeric fill character. The fill character must be
- representable in a single byte in order to work with precision
- and width counts. The default numeric fill character is the
- space character. This flag does not affect field width filling
- which always uses the space character. This flag is ignored
- unless a left precision (see below) is specified.
-
- _^^^^ Do not format the currency amount with grouping characters.
- The default is to insert the grouping characters if defined for
- the current locale.
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ssssttttrrrrffffmmmmoooonnnn((((3333SSSS)))) ssssttttrrrrffffmmmmoooonnnn((((3333SSSS))))
-
-
-
- _++++ _oooo_rrrr _(((( Specify the style of representing positive and negative
- currency amounts. Only one of + or ( may be specified. If + is
- specified, the locale's equivalent of + and - are used (for
- example, in the U.S.A.: the empty string if positive and - if
- negative). If ( is specified, negative amounts are enclosed
- within parentheses. If neither flag is specified, the + style
- is used.
-
- _!!!! Suppress the currency symbol from the output conversion.
-
- _---- Specify the alignment. If this flag is present all fields are
- left-justified (padded to the right) rather than right-
- justified.
-
- FFFFiiiieeeelllldddd WWWWiiiiddddtttthhhh
-
- _wwww A decimal digit string _w specifying a minimum field width in bytes
- in which the result of the conversion is right-justified (or left-
- justified if the flag - is specified). The default is 0.
-
- LLLLeeeefffftttt PPPPrrrreeeecccciiiissssiiiioooonnnn
-
- _####_nnnn A # followed by a decimal digit string _n specifying a maximum number
- of digits expected to be formatted to the left of the radix
- character. This option can be used to keep the formatted output from
- multiple calls to the _s_t_r_f_m_o_n aligned in the same columns. It can
- also be used to fill unused positions with a special character as in
- $***_1_2_3._4_5. This option causes an amount to be formatted as if it
- has causes an amount to be formatted as if it has the number of
- digits specified by _n. If more than _n digit positions are required,
- this conversion specification is ignored. Digit positions in excess
- of those actually required are filled with the numeric fill
- character (see the _====_ffff flag above).
-
- If grouping has not been suppressed with the _^^^^ flag, and it is defined
- for the current locale, grouping separators are inserted before the fill
- characters (if any) are added. Grouping separators are not applied to
- fill characters even if the fill character is a digit.
-
- To ensure alignment, any characters appearing before or after the number
- in the formatted output such as currency or sign symbols are padded as
- necessary with space characters to make their positive and negative
- formats an equal length.
-
- RRRRiiiigggghhhhtttt PPPPrrrreeeecccciiiissssiiiioooonnnn
-
- ._p A period followed by a decimal digit string _p specifying the number
- of digits after the radix character. If the value of the right
- precision _p is 0, no radix character appears. If a right precision
- is not included, a default specified by the current locale is used.
- The amount being formatted is rounded to the specified number of
- digits prior to formatting.
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- ssssttttrrrrffffmmmmoooonnnn((((3333SSSS)))) ssssttttrrrrffffmmmmoooonnnn((((3333SSSS))))
-
-
-
- CCCCoooonnnnvvvveeeerrrrssssiiiioooonnnn CCCChhhhaaaarrrraaaacccctttteeeerrrrssss
-
- The conversion characters and their meanings are:
-
- _iiii The ddddoooouuuubbbblllleeee argument is formatted according to the locale's
- international currency format (for example, in the U.S.A.: _UUUU_SSSS_DDDD
- _1111_,,,,_2222_3333_4444_...._5555_6666).
-
- _nnnn The ddddoooouuuubbbblllleeee argument is formatted according to the locale's national
- currency format (for example, in the U.S.A.: _$$$$_1111_,,,,_2222_3333_4444_...._5555_6666).
-
- _%%%% Convert to a _%%%%; no argument is converted. The entire conversion
- specification must be _%%%%_%%%%.
-
- LLLLooooccccaaaalllleeee IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
-
- The LC_MONETARY category of the program's locale affects the behaviour of
- this function including the monetary radix character (which may be
- different from the numeric radix character affected by the LC_NUMERIC
- category), the grouping separator, the currency symbols and formats. The
- international currency symbol should be conformant with the ISO 4217:
- 1987 standard.
-
- The monetary formatting information being unavailable in the POSIX
- locale, the result is undefined.
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- If the total number of resulting bytes including the terminating null
- byte is not more than _m_a_x_s_i_z_e, _s_t_r_f_m_o_n returns the number of bytes placed
- into the array pointed to by _s, not including the terminating null byte.
- Otherwise, -1 is returned, the contents of the array are indeterminate,
- and _e_r_r_n_o is set to indicate the error.
-
- EEEERRRRRRRROOOORRRRSSSS
- _s_t_r_f_m_o_n _w_i_l_l _f_a_i_l _i_f:
-
- _[[[[_EEEE_2222_BBBB_IIII_GGGG_]]]] Conversion stopped due to lack of space in the buffer.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- _llll_oooo_cccc_aaaa_llll_eeee_cccc_oooo_nnnn_vvvv_((((_))))_....
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-